import com.mapper.UserMapperImpl;
import com.pojo.User;
import org.junit.Test;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

public class test {

    @Test
    public static void test1(){
       ApplicationContext cpx = new ClassPathXmlApplicationContext("applicationContext.xml");
        UserMapperImpl userMapper = cpx.getBean("userMapper", UserMapperImpl.class);
        for (User user : userMapper.selectUser()) {
            System.out.println(user);
        }
    }
}
